import Vue from 'vue'
import VueRouter from 'vue-router'

import UI_Router from '../views/UI_Router.vue'
import Contacts from '../views/Contacts.vue'
import About from '../views/About.vue'

import All_contacts from '../views/son/All_contacts.vue'
import Alice from '../views/son/Alice.vue'
import Bob from '../views/son/Bob.vue'

import Blog from '../views/son/child/Blog.vue'
import Fax from '../views/son/child/Fax.vue'
Vue.use(VueRouter)

const routes = [{
        path: "/",
        redirect: "/UI_Router"
    }, {
        path: "/UI_Router",
        component: UI_Router
    },
    {
        path: "/contacts",
        component: Contacts,
        children: [{
            path: "all_contacts",
            component: All_contacts
        }, {
            path: "alice",
            component: Alice
        }, {
            path: "bob",
            component: Bob,
            children: [{
                path: "blog",
                component: Blog
            }, {
                path: "fax",
                component: Fax
            }]
        }]
    },
    {
        path: "/about",
        component: About
    }
]
const router = new VueRouter({
    routes
})
export default router